package com.distribute.common;



import java.io.Serializable;

/**
 * 上报数据实体类
 *
 * @author chennengcheng
 * @date 2021-09-08 10:15
 * @remark
 */

public class ReportEntity implements Serializable {

    private String ip;

    private String serviceName;

    private String activeProfile;

    private NotifyPluginType notifyPluginType;

    private String modelPrefixName;

    private String modelName;

    private String cacheClassName;

    private int cacheSize;

    private Boolean status;

    public void setIp(String ip) {
        this.ip = ip;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public void setModelName(String modelName) {
        this.modelName = modelName;
    }

    public void setCacheSize(int cacheSize) {
        this.cacheSize = cacheSize;
    }

    public void setCacheClassName(String cacheClassName) {
        this.cacheClassName = cacheClassName;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }


    public NotifyPluginType getNotifyPluginType() {
        return notifyPluginType;
    }

    public void setNotifyPluginType(NotifyPluginType notifyPluginType) {
        this.notifyPluginType = notifyPluginType;
    }

    public String getActiveProfile() {
        return activeProfile;
    }

    public void setActiveProfile(String activeProfile) {
        this.activeProfile = activeProfile;
    }

    public static ReportEntity getInstance(String ip, String activeProfile, String serviceName, NotifyPluginType notifyPluginType, String modelPrefixName, String modelName, String cacheClassName, int cacheSize, Boolean status){
        ReportEntity reportEntity = new ReportEntity();
        reportEntity.setIp(ip);
        reportEntity.setActiveProfile(activeProfile);
        reportEntity.setServiceName(serviceName);
        reportEntity.setModelPrefixName(modelPrefixName);
        reportEntity.setModelName(modelName);
        reportEntity.setCacheSize(cacheSize);
        reportEntity.setCacheClassName(cacheClassName);
        reportEntity.setStatus(status);
        reportEntity.setNotifyPluginType(notifyPluginType);
        return reportEntity;
    }

    public String getModelPrefixName() {
        return modelPrefixName;
    }

    public void setModelPrefixName(String modelPrefixName) {
        this.modelPrefixName = modelPrefixName;
    }

    public String getIp() {
        return ip;
    }

    public String getServiceName() {
        return serviceName;
    }

    public Boolean getStatus() {
        return status;
    }

    public String getModelName() {
        return modelName;
    }

    public String getCacheClassName() {
        return cacheClassName;
    }

    public int getCacheSize() {
        return cacheSize;
    }

    private ReportEntity() {
    }
}
